package lab03.Test01;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

/**
 * Created by lady on 2017/12/13.
 */
public class Test {
    public static void main(String[] args) {
        String path="F:\\大二上学期\\Java\\hello.txt";
        BufferedWriter writer =null;
        try {
            writer = new BufferedWriter(new FileWriter(path));
            writer.write("hello,world!");
            writer.newLine();
            writer.write("012832748");
            writer.newLine();
            writer.write("nxscyewucywe");
            writer.newLine();
            writer.write("bye!!!");
            writer.newLine();

        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            try {
                writer.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }

}
